#include "pass_manager.h"
#include "gui_manager.h"
#include "gui_button.h"
#include "gui_enum.h"

pass_manager::pass_manager()
: current_scene_index(0)
, scene_count(0)
, keep_time(0.0f)
{

}

pass_manager::~pass_manager()
{

}

void pass_manager::set_scene_count(int n)
{
    scene_count = n;
}

void pass_manager::set_current_scene(int idx)
{
    current_scene_index = idx;
}

int pass_manager::get_current_scene()
{
    return current_scene_index;
}

void pass_manager::pass_scene()
{
    if (current_scene_index < scene_count-1)
	{
		unlock_scene(current_scene_index+1);
	}
}

void pass_manager::unlock_scene(int idx)
{
    gui_manager::get_instance()->get_button(SELECT_BUTTON+idx)->SetLock(false);
}

void pass_manager::update_keep_time(float t)
{
    keep_time = t;
}

float pass_manager::get_keep_time()
{
    return keep_time;
}